if(RL_BUILD_MATH)
	add_subdirectory(rlDenavitHartenbergDemo)
	add_subdirectory(rlEulerAnglesDemo)
	add_subdirectory(rlFilterDemo)
	add_subdirectory(rlInterpolatorDemo)
	add_subdirectory(rlPcaDemo)
	add_subdirectory(rlQuaternionDemo)
	add_subdirectory(rlPolynomialRootsDemo)
	add_subdirectory(rlRotationConverterDemo)
	add_subdirectory(rlTrapezoidalVelocityDemo)
endif()

if(RL_BUILD_UTIL)
	add_subdirectory(rlThreadsDemo)
	add_subdirectory(rlTimerDemo)
endif()

if(RL_BUILD_XML)
	add_subdirectory(rlLoadXmlDemo)
endif()

if(RL_BUILD_KIN)
	add_subdirectory(rlJacobianDemo)
	add_subdirectory(rlPumaDemo)
endif()

if(RL_BUILD_MDL)
	add_subdirectory(rlDynamics1Demo)
	add_subdirectory(rlDynamics2Demo)
	add_subdirectory(rlInversePositionDemo)
endif()

if(RL_BUILD_HAL)
	add_subdirectory(rlAxisControllerDemo)
	add_subdirectory(rlCameraDemo)
	add_subdirectory(rlGripperDemo)
	add_subdirectory(rlLaserDemo)
	add_subdirectory(rlRangeSensorDemo)
	add_subdirectory(rlSixAxisForceTorqueSensorDemo)
	add_subdirectory(rlSocketDemo)
endif()

if(RL_BUILD_SG)
	add_subdirectory(rlCollisionDemo)
	add_subdirectory(rlViewDemo)
endif()

if(RL_BUILD_KIN AND RL_BUILD_SG)
	add_subdirectory(rlCoachKin)
endif()

if(RL_BUILD_MDL AND RL_BUILD_SG)
	add_subdirectory(rlCoachMdl)
	add_subdirectory(rlSimulator)
endif()

if(RL_BUILD_PLAN)
	add_subdirectory(rlPlanDemo)
	add_subdirectory(rlPrmDemo)
	add_subdirectory(rlRrtDemo)
endif()

set(CPACK_NSIS_CREATE_ICONS_EXTRA ${CPACK_NSIS_CREATE_ICONS_EXTRA} PARENT_SCOPE)
set(CPACK_NSIS_DELETE_ICONS_EXTRA ${CPACK_NSIS_DELETE_ICONS_EXTRA} PARENT_SCOPE)
set(WIX_SHORTCUTS ${WIX_SHORTCUTS} PARENT_SCOPE)

if(UNIX)
	install(FILES ${rl_SOURCE_DIR}/robotics-library.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps COMPONENT demos)
endif()
